CREATE TABLE jms_dm.dm_reback_all_cnt_dt (
     agent_code varchar(64) NULL COMMENT "代理区编码",
     agent_name varchar(128) NULL COMMENT "代理区编码",
     network_code varchar(64) NULL COMMENT "网点编码",
     network_name varchar(128) NULL COMMENT "网点编码",
     operate_num int(11) NULL COMMENT "操作量 派件量，中转件量",
     reback_cnt int(11) NULL COMMENT "退件量",
     reback_cod_cnt int(11) NULL COMMENT "退件中cod量",
     not_reback_cnt int(11) NULL COMMENT "不用退回件量",
     error_deliver_cnt int(11) NULL COMMENT "未按要求派送量",
     abnomal_cod_cnt int(11) NULL COMMENT "异常退件中cod量",
     cnt_type int(11) NULL COMMENT "1中心退件率登记时间统计2中心退件率审核时间统计3派件退件率登记时间统计4派件退件率审核时间统计5揽收退件率登记时间统计6揽收拦截率登记时间统计",
     date_time date NULL COMMENT "日期",
     network_type int(11) NULL COMMENT "网点类型：网点类型:1-总部,2-代理区,3-加盟商,4-中心,5-集散点,6-网点",
     detail_type int(11) NULL COMMENT "明细类型 1登记 2申请",
     scan_type int(11) NULL COMMENT "扫描类型 6派件5揽收4中心转运",
     is_intercept int(11) NULL COMMENT "揽收是否拦截1是0否"
) ENGINE=OLAP 
DUPLICATE KEY(agent_code)
COMMENT "退件率汇总"
PARTITION BY RANGE(date_time) ( 
   START ("2023-11-05") END ("2024-01-04") EVERY (INTERVAL 1 day))
DISTRIBUTED BY HASH(site_code) BUCKETS 4
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-365",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "4",
"in_memory" = "false",
"storage_format" = "V2"
);